// 多语言支持定义

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';

const languages = {
    en: {
        translation: {
            loading: "loading...",
            password: "Password",
            Signin: "Sign in",
            account: "Account",
            username: "UserName",
            login: "Login",
            error: "Error",
            loginerror: "Login failed",
            yonyouaudit: "Yonyou Audit",
            shenyi: "ShenYi",
            ok: "Ok",
            cancel: "Cancel",
            close: "Close",
            info: "Information",
            tip: "Tip"
        }
    },
    zh: {
        translation: {
            loading: "正在加載...",
            password: "密码",
            Signin: "登  录",
            account: "账户",
            username: "用户",
            login: "登录",
            error: "错误",
            loginerror: "登录失败",
            yonyouaudit: "用友审计",
            shenyi: "审易",
            ok: "确定",
            cancel: "取消",
            close: "关闭",
            info: "信息",
            tip: "提示"
        }
    }
};


i18n
    .use(initReactI18next) // passes i18n down to react-i18next
    .init({
        resources: languages,
        lng: 'zh',
        keySeparator: false, // we do not use keys in form messages.welcome
        interpolation: {
            escapeValue: false, // react already safes from xss
        },
    });

export default i18n;